<?php


namespace chixian\Libraries\Exception\Logger;


use Hyperf\Contract\ContainerInterface;
use Hyperf\Logger\LoggerFactory;
use Psr\Log\LoggerInterface;

class AppLoggerFactory
{
    /**
     * app日志依赖工厂
     * @param ContainerInterface $container
     * @return LoggerInterface
     * @throws \Psr\Container\ContainerExceptionInterface
     * @throws \Psr\Container\NotFoundExceptionInterface
     */
    public function __invoke(ContainerInterface $container): LoggerInterface
    {
        return $container->get(LoggerFactory::class)->get('log');
    }
}